package com.sykj.manage.service.imp;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sykj.manage.dao.SysDictionaryDao;
import com.sykj.manage.model.DictionaryIndex;
import com.sykj.manage.model.SysDictionary;
import com.sykj.manage.service.SysDictionaryService;



@Service
public class SysDictionaryServiceImpl implements SysDictionaryService {
	
	@Autowired
	SysDictionaryDao iSysDictionaryDao;
	
	/* 微信菜单类型查询
	 * (non-Javadoc)
	 * @see com.sykj.manage.service.ISysDictionaryService#findMtypes()
	 */
	@Override
	public List<SysDictionary> findMtypes() {
		return iSysDictionaryDao.findMtypes();
	}

	/* 字典标识
	 * (non-Javadoc)
	 * @see com.sykj.manage.service.ISysDictionaryService#findDictionaryIndexs()
	 */
	@Override
	public List<DictionaryIndex> findDictionaryIndexs(DictionaryIndex dictionaryIndex) {
		return iSysDictionaryDao.findDictionaryIndexs(dictionaryIndex);
	}

	/* 字典查询
	 * (non-Javadoc)
	 * @see com.sykj.manage.service.ISysDictionaryService#findDictionarysById(java.lang.String)
	 */
	@Override
	public List<SysDictionary> findDictionarysById(SysDictionary sysDictionary) {
		return iSysDictionaryDao.findDictionarysById(sysDictionary);
	}

	/* 根据id查询字典标识
	 * (non-Javadoc)
	 * @see com.sykj.manage.service.ISysDictionaryService#findDictionaryIndexById(java.lang.String)
	 */
	@Override
	public DictionaryIndex findDictionaryIndexById(String dic_index_id) {
		return iSysDictionaryDao.findDictionaryIndexById(dic_index_id);
	}

	/* 添加字典标识
	 * (non-Javadoc)
	 * @see com.sykj.manage.service.ISysDictionaryService#addDictionaryIndex(com.sykj.model.DictionaryIndex)
	 */
	@Override
	public int addDictionaryIndex(DictionaryIndex dictionaryIndex) {
		return iSysDictionaryDao.addDictionaryIndex(dictionaryIndex);
	}

	/* 修改字典标识
	 * (non-Javadoc)
	 * @see com.sykj.manage.service.ISysDictionaryService#updDictionaryIndex(com.sykj.model.DictionaryIndex)
	 */
	@Override
	public int updDictionaryIndex(DictionaryIndex dictionaryIndex) {
		return iSysDictionaryDao.updDictionaryIndex(dictionaryIndex);
	}

	/* 删除字典标识
	 * (non-Javadoc)
	 * @see com.sykj.manage.service.ISysDictionaryService#delDictionaryIndex(java.lang.String[])
	 */
	@Override
	public int delDictionaryIndex(String[] dic_index_ids) {
		return iSysDictionaryDao.delDictionaryIndex(dic_index_ids);
	}

	/* 根据id查询字典
	 * (non-Javadoc)
	 * @see com.sykj.manage.service.ISysDictionaryService#findDictionaryById(java.lang.String)
	 */
	@Override
	public SysDictionary findDictionaryById(String dic_id) {
		return iSysDictionaryDao.findDictionaryById(dic_id);
	}

	/* 添加字典
	 * (non-Javadoc)
	 * @see com.sykj.manage.service.ISysDictionaryService#addDictionary(com.sykj.model.SysDictionary)
	 */
	@Override
	public int addDictionary(SysDictionary sysDictionary) {
		return iSysDictionaryDao.addDictionary(sysDictionary);
	}

	/* 修改字典
	 * (non-Javadoc)
	 * @see com.sykj.manage.service.ISysDictionaryService#updDictionary(com.sykj.model.SysDictionary)
	 */
	@Override
	public int updDictionary(SysDictionary sysDictionary) {
		return iSysDictionaryDao.updDictionary(sysDictionary);
	}

	/* 删除字典
	 * (non-Javadoc)
	 * @see com.sykj.manage.service.ISysDictionaryService#delDictionary(java.lang.String[])
	 */
	@Override
	public int delDictionary(String[] dic_ids) {
		return iSysDictionaryDao.delDictionary(dic_ids);
	}

}
